home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 1 / Gold Medal Software Volume 1 (Gold Medal) (1994).iso / graphics / povsrc20.arj / MACHINE / AMIGA / AMIGACON.H < prev   
C/C++ Source or Header  |  1993-09-22  |  7KB  |  140 lines

  1. /****************************************************************************
  2. *                   amigaconf.h
  3. *
  4. *  This module contains Amiga-specific defines, types, and other declarations.
  5. *  Rename to config.h when compiling for Amiga.
  6. *
  7. *  from Persistence of Vision Raytracer
  8. *  Copyright 1993 Persistence of Vision Team
  9. *---------------------------------------------------------------------------
  10. *  NOTICE: This source code file is provided so that users may experiment
  11. *  with enhancements to POV-Ray and to port the software to platforms other 
  12. *  than those supported by the POV-Ray Team.  There are strict rules under
  13. *  which you are permitted to use this file.  The rules are in the file
  14. *  named POVLEGAL.DOC which should be distributed with this file. If 
  15. *  POVLEGAL.DOC is not available or for more info please contact the POV-Ray
  16. *  Team Coordinator by leaving a message in CompuServe's Graphics Developer's
  17. *  Forum.  The latest version of POV-Ray may be found there as well.
  18. *
  19. * This program is based on the popular DKB raytracer version 2.12.
  20. * DKBTrace was originally written by David K. Buck.
  21. * DKBTrace Ver 2.0-2.12 were written by David K. Buck & Aaron A. Collins.
  22. *
  23. *****************************************************************************/
  24. /* Below are several defines needed by the generic parts of POV.  You
  25. *   may redefine them as needed in this config.h file.
  26. *
  27. *   The following constants are needed by various POV modules.  Each has
  28. *   a default (shown below) which is will be defined in frame.h if you don't 
  29. *   define them here.
  30. *
  31. *   #define EPSILON 1.0e-10               - a small value used for POLY
  32. *   #define FILE_NAME_LENGTH 150          - default file name length
  33. *   #define HUGE_VAL 1.0e+17              - a really big number
  34. *   #define DBL_FORMAT_STRING "%lf"       - the string to use for scanfs of doubles
  35. *   #define DEFAULT_OUTPUT_FORMAT  'd'    - the default +f format
  36. *   #define RED_RAW_FILE_EXTENSION ".red" - for +fr, this is the extension for the
  37. *                                           red file
  38. *   #define GREEN_RAW_FILE_EXTENSION ".grn"  - ditto for the green file
  39. *   #define BLUE_RAW_FILE_EXTENSION ".blu"   - ditto again for the blue file
  40. *   #define FILENAME_SEPARATOR "/"        - the character that separates names
  41. *                                           in a path.
  42. *   #define CASE_SENSITIVE_DEFAULT 2     - controls case sensitivity in DAT files
  43. *   #define READ_FILE_STRING "rb"        - special binary (raw, uncooked) 
  44. *   #define WRITE_FILE_STRING "wb"         modes of fopen()
  45. *   #define APPEND_FILE_STRING "ab"
  46. *   #define NORMAL '0'                   - machine-specific PaletteOption settings 
  47. *   #define GREY   'G'
  48. *
  49. *   These routines are required by POV to compute trace times.  The defaults 
  50. *   shown below are defined in most versions of C.  You may redefine them if
  51. *   your compiler doesn't support these.  If time is completely unsupported 
  52. *   define them as 0.
  53. *
  54. *   #define START_TIME time(&tstart);     
  55. *   #define STOP_TIME  time(&tstop);
  56. *   #define TIME_ELAPSED difftime (tstop, tstart);
  57. *
  58. *   Note difftime can be replaced with: #define TIME_ELAPSED (tstop - tstart); 
  59. *   in some cases. 
  60. *
  61. *   These are optional routines that POV calls.  You may define them
  62. *   or if undefined they will be defined as empty in frame.h.
  63. *
  64. *   #define STARTUP_POVRAY             - first executable statement of main
  65. *                                           (useful for initialization)
  66. *   #define PRINT_OTHER_CREDITS           - used for people who extend the machine specific modules
  67. *                                           (put your own printf's here)
  68. *   #define TEST_ABORT                    - code to test for ^C or abort
  69. *                                           (called on each pixel)
  70. *   #define FINISH_POVRAY              - last statement before exiting normally
  71. *   #define COOPERATE                    - called for multi-tasking
  72. *  
  73. *   These items are standard on some C compilers.  If they are not defined
  74. *   on your compiler or are called something different you may define your 
  75. *   own or use the defaults supplied in frame.h as shown below.
  76. *
  77. *   #define DBL double                    - floating point precision
  78. *   #define ACOS acos                     - arc cosine of DBL
  79. *   #define SQRT sqrt                     - square root of DBL
  80. *   #define POW pow                       - x to the y power - x, y DBL
  81. *   #define COS cos                       - cosine of DBL
  82. *   #define SIN sin                       - sine of DBL
  83. *   #define labs(x) (long) ((x<0)?-x:x)   - Returns the absolute value of long integer x
  84. *   #define max (x,y) ((x<y)?y:x)         - greater of x and y
  85. *
  86. *   On some systems "sprintf" returns the string rather than the length
  87. *   of the string.  If the string is returned, define the following:
  88. *   #define STRLN(x) strlen(x)
  89. *
  90. *   #define setvbuf(w,x,y,z)              - some systems don't understand setvbuf.
  91. *                                           If not, just define it away - it's
  92. *                                           not critical to the raytracer.  It
  93. *                                           just buffers disk accesses.
  94. *   This macro controls prototyping and is required by POV.  Choose one
  95. *   of the two options below or if left undefined it will default to ANSI 
  96. *   in frame.h
  97. *
  98. *   #define PARAMS (x) x                  - do ANSI prototyping
  99. *   #define PARAMS (x) ()                 - do K&R non-ANSI prototyping
  100. *
  101. *   These allow command line vs non-command line versions and alternate
  102. *   main routines.  Normally they should be undefined.  Define them 1 if needed.
  103. *   #define ALTMAIN 1
  104. *   #define NOCMDLINE 1
  105. ****************************************************/
  106.  
  107. #include <dos.h>
  108. #include <stdlib.h>
  109. #ifdef M68881
  110. #include <m68881.h>
  111. #endif
  112.  
  113. /* For the Amiga, we can use ANSI prototype definitions. */
  114. #define PARAMS(x) x
  115.  
  116. #define EPSILON 1.0e-5
  117.  
  118. #define STARTUP_POVRAY amiga_init_POVRAY();
  119. #define TEST_ABORT chkabort();
  120.  
  121. /* Amiga wants prototypes for these standard routines */
  122. void main (int, char**);
  123. void exit(int);
  124. extern char *getenv PARAMS((char *str));
  125.  
  126. /**********************************
  127. *    The defines below have nothing to do with the generic part of POV.
  128. *    They are entirely machine specific.  In general do not include them 
  129. *    when porting to other platforms.
  130. ***********************************/
  131.  
  132. extern int _bufsiz;
  133.  
  134. int amiga_close_all(void);
  135.  
  136. void amiga_init_POVRAY PARAMS((void));
  137.  
  138. #define TIME_ELAPSED ((unsigned long) tstop - (unsigned long) tstart);
  139. #define COMPILER_VER ".sas"
  140.